package dst.tree;

/**
 * A class for instantiating directed trees. Each tree node only contains
 * its own data and a list of its children.
 *
 * Fully Tested: No
 * Fully Documented: No
 * Created: 20-Nov-2011
 * Last Updated: 20-Nov-2011
 *
 * @author Shimu Wu
 */
public class DirectedTree<T> {

    private TreeNode<T> root;

    /**
     * Instantiates a DirectedTree rooted at a TreeNode containing
     * the given rootData
     * @param rootData the data of the root node
     */
    public DirectedTree(T rootData) {
        this.root = new TreeNode<T>(rootData);
    }

    /**
     * Instantiates a DirectedTree rooted at the given root TreeNode
     * @param root the root of the new DirectedTree
     */
    public DirectedTree(TreeNode<T> root) {
        this.root = root;
    }
    
    public TreeNode<T> getRoot() {
        return root;
    }
}
